<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>付款租赁物信息</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
var taskDefKey = "${taskDefKey}";
var isAllowPay = "${isAllowPay}";
    var grid = null;
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/capital/capPayInfo/initLeaseList.do?paySchId=${paySchId}',
            method: 'get',
            columns: [
                {display: '品牌', name: 'brCdNm', minWidth: 100, align: 'left', enabledSort: false},
                {display: '租赁物名称', name: 'prdNm', minWidth: 100, align: 'left', enabledSort: false},
                {display: '型号规格', name: 'prdMdl', minWidth: 100, align: 'left', enabledSort: false},
                {display: '数量', name: 'prdQty', width: 80, align: 'right', enabledSort: false},
                {display: '单价(元)', name: 'prdAmt', width: 100, align: 'right', enabledSort: false,
                    render:function(rowdata,index,value){
                        return '&yen;'+FormatMoney(rowdata.prdAmt/100);
                    },
                },
                {display: '小计(元)',name:'ttlAmt', width: 140, align: 'right', enabledSort: false,
                    render:function(rowdata,index,value){
                        return '&yen;'+FormatMoney(rowdata.ttlAmt/100);
                    },
                    totalSummary: {
                        type: 'sum', render: function (suminf, column, cell) {
                            return '<div style="color: red;">总价值:&yen;'+FormatMoney(suminf.sum/100)+'</div>';
                        },align: 'right'
                    }
                },
               /*  {display: '参数配置', name: '', width: 80, align: 'center', enabledSort: false,
                    render:function(rowdata,index,value){
                        return "<a class='sq-button-hasicon' style='cursor: pointer;' onclick='getPrdDtl("+rowdata.prjPrdId+","+rowdata.prjId+");'><i class='sqBtnIco_1'></i>查询</a>";
                    }
                }, */
                {display: '参数配置', name: '', width: 80, align: 'center', enabledSort: false,
                    render:function(rowdata,index,value){
                    if(taskDefKey == "FLOW_00000008_002_002_002" ||taskDefKey == "FLOW_00000008_007_002_010"){
                        if (!isAllowPay || isAllowPay != '0'){
                            return "<a class='sq-button-hasicon' style='cursor: pointer;' onclick='getPrdDtl1("+rowdata.prjPrdDtlId+");'><i class='sqBtnIco_4'></i>修改</a>";
                        }
                   	}else{
                   		 return "<a class='sq-button-hasicon' style='cursor: pointer;' onclick='getPrdDtl("+rowdata.prjPrdDtlId+");'><i class='sqBtnIco_4'></i>查看</a>";
                   	}
                    }
                },
            ],
            usePager: false,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: true,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: false
        });
        grid.setHeight(100);

        $("#pageloading").hide();

    });

    //查询租赁物详情
    <%-- function getPrdDtl(_prjPrdId,_prjId){
        Add_navTab('tab_prj_prd_info_modify','参数配置','<%=path%>/project/prjprdbscinfo/toModifyPage.do?id='+_prjPrdId+'&prjId='+_prjId+'&detailFlag=true',null);
    } --%>
    
  <%--   function getPrdDtl(dtlId){
    	var detailFlag = true;
    	Add_navTab( 'tab_prj_prd_dtl_info'+dtlId,'车辆信息详情','<%=path%>/project/prjprddtl/toModifyPrjPrdDtlCarPrdInfoPage.do?detailFlag='+detailFlag+'&&dtlId='+dtlId);
    } --%>
    function getPrdDtl(dtlId){//查看
        var detailFlag = true;
        Add_navTab( 'tab_prj_prd_dtl_info'+dtlId,'车辆信息详情','<%=path%>/project/prjprddtl/toModifyPrjPrdDtlCarPrdInfoPage.do?detailFlag='+detailFlag+'&&dtlId='+dtlId);
        
    }
    
    function getPrdDtl1(dtlId){//修改
    	var detailFlag = false;
    	var Caralter = 1;
        Add_navTab( 'tab_prj_prd_dtl_info'+dtlId,'车辆信息详情','<%=path%>/project/prjprddtl/toModifyPrjPrdDtlCarPrdInfoPage.do?detailFlag='+detailFlag+'&&dtlId='+dtlId+'&&Caralter='+Caralter+'&&taskDefKey='+taskDefKey);
        
    }

</script>

</body>
</html>
